Completed
Push — master ( 7403a2...9afade )
by Taavo-Taur
02:16
created

utils.test.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 8
Bugs 0 Features 0
Metric Value
cc 1
c 8
b 0
f 0
nc 1
nop 1
dl 0
loc 11
rs 9.4285
1
import test from 'ava'
2
import * as utils from '../src/utils'
3
4
test('isNumberLike', t => {
5
	t.truthy(utils.isNumericIDLike('2'))
6
7
	// Ignore numbers
8
	t.falsy(utils.isNumericIDLike(1))
9
	t.falsy(utils.isNumericIDLike(1.2))
10
	// Ignore non-id
11
	t.falsy(utils.isNumericIDLike('2.6'))
12
	// Some sort of UUID that only has numbers (but should be string)
13
	t.falsy(utils.isNumericIDLike('132-3534-23'))
14
})
15